<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>

    <link rel="shortcut icon" href="../../images/favicon.png"/>
    <link rel="stylesheet" href="../../vendors/iconfonts/mdi/css/materialdesignicons.min.css"/>
    <link rel="stylesheet" href="../../vendors/css/vendor.bundle.base.css"/>
    <link rel="stylesheet" href="../../css/style.css"/>
    <link rel="shortcut icon" href="../../images/favicon.png"/>
    <script type="text/javascript" src="../../js/Calendar.js"></script>

    <style type="text/css">
        #menu, #ac {
            list-style: none; /* 将默认的列表符号去掉 */
            padding: 0; /* 将默认的内边距去掉 */
            margin: 0; /* 将默认的外边距去掉 */
        }

        #ac li {
            float: left; /* 往左浮动 */
        }
        #anu{
            float: right;
        }
    </style>

</head>

<body>

<div calss="card-head">

    <div class="card">
        <div class="card-body2">
            <h4 class="card-title">首页/运营管理/用户反馈</h4>

            <div id="menu" style="margin-left:80px;">

                <form class="form-inline"  id="formfeed" method="post">
                    <input type="hidden" id="currentPageNo" name="currentPageNo" value="1"/>
                    <ul id="ac">
                        <li>

                            <p>反馈人：
                                <input type="text" class="form-control mb-2 mr-sm-2" id="inlineFormInputName2"
                                       name="userName" th:value="${userName}"  placeholder="  用户姓名/手机号" style=" width:250px"/>
                            </p>
                        </li>
                        <li>

                            <p>反馈问题类型：
                                <input list="test" type="text" class="form-control" id="inlineFormInputGroupUsername2"
                                       name="feedbackQuestion" th:value="${feedbackQuestion}"   placeholder="  全部" style=" margin-right:20px;"/>
                            </p>
                        </li>

                        <li>
                            <button type="button" id="feedSubmit"
                                    style="width:80px;text-align:center;margin-top:3px;height:40px;color:white;border-radius:5px;background:pink">
                                查询
                            </button>

                        </li>
                    </ul>
                </form>
            </div>
        </div>
    </div>


</div>
<div class="card-body">

    <div id="u17880" class="ax_default _默认样式">
        <div id="u17880_div" class=""></div>
        <div id="u17880_text" class="text ">
            <p style="font-size:18px;"><span
                    style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:12px;text-decoration:none;"> </span><span
                    style="font-family:'微软雅黑';font-weight:400;font-size:12px;text-decoration:none;">数据列表</span></p>
        </div>
    </div>


    <table class="table table-bordered">
        <thead>
        <tr>
            <th>
                <!--<input type="checkbox" class="form-check-input" >-->
                <input type="checkbox" id="chooseAll" style=" vertical-align: middle; margin-top: -13px;margin-left: 15px;" class="form-check-input"/>
            </th>
            <th>
                编号
            </th>
            <th>
                反馈问题类型
            </th>
            <th>
                用户姓名
            </th>
            <th>
                反馈时间
            </th>
            <th>
                问题描述
            </th>
            <th>
                处理状态
            </th>
            <th>
                处理结果
            </th>
            <th>
                操作
            </th>
        </tr>
        </thead>
        <tbody>
            <tr th:attr="ufId=${UserFeedback.ufId}+'_row'" th:each="UserFeedback:${userFeedbackList}" class="table-warning">
                <th>
                    <input type="checkbox" style=" vertical-align: middle; margin-top: -5px;margin-left: 15px;" class="form-check-input"/>
                </th>
                <th th:text="${UserFeedback.ufId}"></th>
                <th th:text="${UserFeedback.feedbackQuestion}"></th>
                <th th:text="${UserFeedback.userName}"></th>
                <th th:text="${UserFeedback.feedbackTime}"></th>
                <th th:text="${UserFeedback.problemDescription}"></th>
                <th th:text="${UserFeedback.processing.status}"></th>
                <th th:text="${UserFeedback.processing.results}"></th>
                <th>
                    <a href="javascript:;" class="seeBtn"  id="seeBtn"  name="seeBtn" data-toggle="modal" data-target="#showSystemInfo" th:attr="ufId=${UserFeedback.ufId}">查看</a>
                    <a href="javascript:;" class="delFeedback" th:onclick="'del(this)'" th:attr="ufId=${UserFeedback.ufId}">删除</a></th>
            </tr>

        </tbody>
    </table>

    <!--<分页查询>-->
    <div class="page-bar">
        <ul class="page-num-ul clearfix">
            <li>共<span th:text="${page.totalCount }"></span>条记录&nbsp;&nbsp; <span th:text="${page.pageIndex}"></span>/<span th:text="${page.totalPageCount}"></span> 页</li>
            <button th:onclick="'javascript:pageQry(document.forms[0],1)'" th:if="${page.pageIndex gt 1 }">首页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex - 1}+')'"  th:if="${page.pageIndex gt 1 }">上一页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex + 1}+')'" th:if="${page.pageIndex lt page.totalPageCount}">下一页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.totalPageCount}+')'" th:if="${page.pageIndex lt page.totalPageCount}">最后一页</button>
            &nbsp;&nbsp;
        </ul>
        <span class="page-go-form"><label>跳转至</label>
             <input type="hidden" id="totalPageCount" th:value="${page.totalPageCount}"/>
             <input type="text" name="inputPage" id="inputPage" class="page-key"/>页
             <button type="button" class="page-btn"
                     th:onClick="'jumpPage(document.forms[0],document.getElementById(\''+inputPage+'\').value)'">GO</button>
		</span>
    </div>
    <!--</分页查询>-->

    <!--分页代码-->
</div>
<script src="../../../static/vendors/js/vendor.bundle.base.js"></script>
<script src="../../../static/vendors/js/vendor.bundle.addons.js"></script>
<!-- endinject -->
<!-- Plugin js for this page-->
<!-- End plugin js for this page-->
<!-- inject:js -->
<script src="../../js/off-canvas.js"></script>
<script src="../../js/misc.js"></script>
<!-- endinject -->
<!-- Custom js for this page-->
<script src="../../js/dashboard.js"></script>

<script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
    //01.分页查询
    function pageQry(form, pageIndex) {
        $.ajax({
            url:"/lhuaw/qryConditionPageAllFeedback?currentPageNo="+pageIndex+"",
            type:"post",
            data:"page=1",
            success:function(){
                // $("#Conframe").load("/lhuaw/qryConditionPageAllFeedback?currentPageNo="+pageIndex+"");
                window.location.href="/lhuaw/qryConditionPageAllFeedback?currentPageNo="+pageIndex;
            },
            error:function () {
                alert("错误");
            }
        })
    }
    //02.跳转页查询
    function jumpPage(form, jumpPageIndex) {
        //01.数字校验
        var reg = /^[1-9]\d{0,}$/;
        if (!reg.test(parseInt(jumpPageIndex))) {
            alert("请输入合法的数字");
            return;
        }
        //02.范围校验：当前页不能大于总页数
        if (jumpPageIndex > document.getElementById("totalPageCount").value) {
            alert("已经是最后一页!");
            return;
        }
        $.ajax({
            type:"post",
            url:"/lhuaw/qryConditionPageAllFeedback?currentPageNo="+jumpPageIndex+"",
            data:"page=1",
            success: function(){
                // $("#Conframe").load("/lhuaw/qryConditionPageAllFeedback?currentPageNo="+jumpPageIndex+"");
                window.location.href="/lhuaw/qryConditionPageAllFeedback?currentPageNo="+jumpPageIndex;
            },
            error:function () {
                alert("错误");
            }
        })
    }
    //删除
    function del(ele) {
        var $ele =$(ele);
        var ufId =$ele.attr('ufId');
        $.ajax({
            "url":'/lhuaw/deleteFeedback/'+ufId+"",
            "type":"get",
            "data":"",
            "dataType":"json",
            "success":function(data){
                alert("删除成功>>>");
                if(data.success) {
                    $("#" + ufId + "_row").remove();
                    // $("#Conframe").load("/lhuaw/qryConditionPageAllFeedback?currentPageNo=1");
                    window.location.href="/lhuaw/qryConditionPageAllFeedback?currentPageNo=1";
                }else
                    alert("删除失败>>>>>>>");
            },
            "error":function(e){
                alert("ajax异常");
            }
        });
    }
    //删除
    //
    //条件查询
    $("#feedSubmit").click(function () {
        $.ajax({
            type: "post",
            dataType: "text",
            url: "/lhuaw/qryConditionPageAllFeedback?currentPageNo=1",
            data:$("#formfeed").serialize(),
            success: function (data) {
                alert($("#formfeed").serialize());
                window.location.href="/lhuaw/qryConditionPageAllFeedback?"+$("#formfeed").serialize();
                // $("#Conframe").load("/lhuaw/qryConditionPageAllFeedback?"+$("#formfeed").serialize()+"");
            },
            error: function () {
                alert("错误");
            }
        });
    })

    //条件查询
</script>

</body>
</html>